package org.example.mapper;

import org.apache.ibatis.annotations.*;
import org.example.entity.User;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from t_user")
    public List<User> findAll();
    @Insert("insert into t_user(id,name,gender,email,address) values(#{id},#{name},#{gender},#{email},#{address})")
    public int insert(User user);
    @Delete("delete from t_user where id = #{id}")
    public int delete(Integer id);
    @Update("update t_user set name=#{name},gender=#{gender},email=#{email},address=#{address} where id=#{id}")
    public int update(User user);
}
